In order to assist application developers during the development cycle of an application program, or service personnel during use of the application program, to determine the cause of a problem or the reason for unexpected behavior of the application program, it is known to generate and store diagnostic information for subsequent analysis. Such diagnostic information typically consists of information produced in response to events occurring within the environment that supports the application program.
The type of diagnostic information to be captured is usually left up to the application developer, but there is a requirement for such diagnostic information to be detailed enough to aid with debugging (e.g. problem determination and source identification), should unexpected behavior, or a crash, occur.
There are known solutions to this requirement. One solution is to continuously trace an application program while it executes. Tracing operations track sequences of events during execution of an application program. Such events or states are often stored in a trace table or in trace files in memory. The trace of an application program is valuable in component debugging, fine-tuning, performance analysis, and for data capture needed at a runtime crash. Thus, tracing an application program continuously results in a continual production of trace data, which is stored and then output when required. However, activating a trace degrades overall system performance and steals resources from other vital tasks.
Another solution is problem re-creation, wherein an application program initially runs without any tracing enabled. This has the advantage of enhanced performance, but the disadvantage that, when a problem occurs, diagnostic information is not available. If a problem occurs, a user manually enables tracing and reruns the application program under the same or similar conditions in order to re-create the problem. Now, if the problem reoccurs, diagnostic information will be available. This approach has the disadvantage that it is difficult to reproduce a problem, as replicating the initial conditions that caused a problem can be complicated, time consuming, and erroneous.